package com.starlink.model.util;

import com.starlink.model.dtomapper.SchoolbagDtoMapper;
import com.starlink.model.domain.SchoolbagDO;
import com.starlink.model.vo.SchoolbagVO;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhanghong
 */
public class SchoolbagConvert {

    public static List<SchoolbagVO> buildSchoolbagVoList(List<SchoolbagDO> schoolbagDOList) {
        if (CollectionUtils.isEmpty(schoolbagDOList)) {
            return Lists.newArrayList();
        }
        List<SchoolbagVO> schoolbagVOList = new ArrayList<>();
        for (SchoolbagDO schoolbagDO : schoolbagDOList) {
            schoolbagVOList.add(SchoolbagDtoMapper.INSTANCE.do2VO(schoolbagDO));
        }

        return schoolbagVOList;
    }
}
